package com.feng.ioc.configuration;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import java.util.Set;

public class MyImportSelector implements ImportSelector {
    //AnnotationMetadata  使用@Import注解的类   的所有注解的信息
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        Set<String> annotationTypes = annotationMetadata.getAnnotationTypes();
        System.out.println("annotationMetadata"+annotationMetadata);
        return new String[]{"Green","Red"};
    }
}
